package com.qfedu.service.impl;

import com.github.pagehelper.PageHelper;
import com.qfedu.dao.UserDao;
import com.qfedu.entity.User;
import com.qfedu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public List<User> findAllUser(Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
//   只有在上面那个语句的下面的查询才会去执行分页，两条命令必须紧挨着
        List<User> user = userDao.findAllUser();

        return user;
    }


}
